Properties

Name Returns Notes Example
host String Get the host this socket is connected to
commentsType String Gets the data type
decodedId String Gets the decoded id that was used when connecting
itemId String Get the Item ID
attributes Map Get the attributes attached to this socket, this includes any parameters included when the socket connected
profileId Long Get the id of the profile if a user is logged in

Methods

Name Returns Notes Example
send ( msg ) void Send a message to this websocket
broadcast ( msg ) void Broadcasts a message to all other sockets with the same type and itemId, excluding this session
setItemId ( itemId ) void Sets the Item ID for this socket, the item id is used when sending and broadcasting messages

Ask a question, or offer an answer